from selenium.webdriver.common.by import By
from selenium.webdriver.remote.webelement import WebElement

from page.base_page import BasePage
from selenium.webdriver import ActionChains
import time
class personaldomain(BasePage):
    def task_waitting(self):
        l1=self._driver.find_element(By.CSS_SELECTOR,'.page-sidebar-menu>li:nth-child(3)>a>span.uppercaseTitle')
        l1.click()
        l2=self._driver.find_element(By.CSS_SELECTOR,'.page-sidebar-menu>li:nth-child(3)>ul>li>a>span.title')
        print(l2.text)
        l2.click()
        l3=self._driver.find_element(By.XPATH,'//span[text()="待办任务"]')
        l3.click()
        time.sleep(5)
    def task_finished(self):
        l1=self._driver.find_element(By.CSS_SELECTOR,'.page-sidebar-menu>li:nth-child(3)>a>span.uppercaseTitle')
        l1.click()
        l2=self._driver.find_element(By.CSS_SELECTOR,'.page-sidebar-menu>li:nth-child(3)>ul>li>a>span.title')
        print(l2.text)
        l2.click()
        l3=self._driver.find_element(By.XPATH,'//span[text()="已办任务"]')
        l3.click()
        time.sleep(5)